<?
	$in=$argv[1];
	$out=$argv[2];
	$fp=fopen($out,"w");
	$buf=<<<EOF
		<function name='@name@'>
			<def lang='c' value='@cdef@' />
			<code></code>
		</function>

EOF;

	$list=explode("\n",file_get_contents($in));
	foreach($list as $item) {	
		if ($item!="") {
			$item1=explode(":",$item);
			$buf1=str_replace("@name@",$item1[0],$buf);
			$buf1=str_replace("@cdef@",$item1[1],$buf1);
			fputs($fp,$buf1);		
		}
	}
	fclose($fp);
?>
